package com.manage.controller;

import com.clms.common.R;
import com.manage.pojo.vo.CouponHistoryVo;
import com.manage.service.CouponHistoryService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: clms-third
 * @description: 优惠券记录控制层
 * @author: 林子洁
 * @create: 2021-07-23 14:42
 **/
@RestController
@RequestMapping("/manage/couponHistory")
public class CouponHistoryController {
    @Resource
    private CouponHistoryService historyService;
    @PostMapping("/initcouponHistory/{currentPage}/{pageSize}")
    public R initcouponHistory(@PathVariable("currentPage") Integer currentPage,
                               @PathVariable("pageSize") Integer pageSize,
                               @RequestBody CouponHistoryVo couponHistoryVo){
        return historyService.initcouponHistory(currentPage,pageSize,couponHistoryVo);
    }

    @DeleteMapping("/deleteCouponHistory/{id}")
    public R deleteCouponHistory(@PathVariable("id") Integer id){
        return historyService.deleteCouponHistory(id);
    }

}
